Latest Questions

Nested REST API resource not found

This feels like what should be a very common question but I cannot find anything related to it. I am working on a 'REST' API with nested / sub-resources GET /us

How to register store as global variable object?

Currently I'm using a reactive store.js like so: import {reactive} from "vue"; const re = reactive({}) export default { re } which then can be used in co

Pyomo constraint: use continuous variable as boolean?

I am looking to use a continuous variable in a bool statement. For example, if m.N[t] is the continuous variable, I'd like to do the following: @m.Constraint(m.

How to setup turborepo with sveltekit and pnpm

I am trying to add Turborepo to my Svelte apps but looks like the npx create-turbo@latest command and also the examples currently only support NextJs. How can I

Prisma: Finding items where two fields have the same value

I would like to find items in a Prisma db where the values for two columns are the same. The use case is to compare the 'created_at' and 'updated_at' fields to

Mikrotik routing between networks via l2tp

I have 2 Mikrotik routers: Home(static WAN IP): LAN - 192.168.30.1/24 VPN IP - 192.168.146.1 Office(Cloud): LAN - 192.168.20.1/24 VPN IP - 192.1

NestJs e2e returns 201 created response though required form data is missing, expected 400 bad request

I'm trying to write a test that checks if request body does not have proper data, it should return an error, and the status code should be 400. Which I think is

How to use Oauth2 Provider instead of Oauth1 in Laravel Socialite?

I'm currently developing social listening API with twitter, the flow is logged in user (using basic API Token to send request to the API) are redirected to twit

Go generics: invalid composite literal type T

package main import ( "google.golang.org/protobuf/proto" ) type NetMessage struct { Data []byte } type Route struct { } type AbstractParse interface

BIts Per Sample / Pixel libtiff vs WIC

TIFF *TiffImage; uint16 photo, bps, spp, fillorder; uint32 width,height; unsigned long stripSize; unsigned long imageOffset, result; int stripMax, stripCount; u

How do I link to another page in my MUI mini drawer sidebar?

I've tried to encapsulate my ListItem component with <Link to"/create> but it doesn't work, i've also tried using the history option but that confused me.

Finding intersection between two lists without duplicates in prolog

I am using Prolog and I am trying to find the intersection or the common elements between two lists and the result should not contain duplicates. In addition, t

Can I set readOnly false when I use findById with JPA

I have a problem with modifying data while setting database replication Before DB replication, I get data that I want to modify using repository.findById() and

How to change value of iRow depending on object value?

I am looking for the iRow value to be dependent on whether the object value. I have 2 buttons: Private Sub OptionButton1_Click() End Sub and Private Sub Optio

How to translate an raw SQL query to TypeORM query builder?

How would I convert the subQuery select with distinct to TypeORM querybuilder? Thanks. SELECT `time`, (case when `start` is NULL then 0 else 1 end) `is_reserved

How to detect message content Discord.js?

I am working on a code for a Discord bot for my server, and I'm currently stumped on a magic 8 ball feature, go figure. I'm trying to get it to check if there i

What is the difference between cross-platform and multi-platform?

Can someone clearly tell the difference between the terms "cross platform" and "multi platform"

When would Git move remote-tracking branches automatically, without 'git fetch'?

The Git documentation (https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches) says: "Remote-tracking branches are references to the state of remote branc

Strange result in loop when use special chars

I have strange problem when special chars in loop when add br and use specal chars, if don´t use words with special chars no have problems but when use sp

File reading with fgetc in C

I have a simple file reading algorithm but it's not returning the values that are in the file. The below is the code. The input txt values are 200 53 65 98 183

How to draw curved line chart using Canvas Jetpack Compose

Does anyone know how to drawLine with curved every corner using canvas in Jetpack Compose? I have achieved this using Canvas.drawPoints(): but I want to make e

Visual Studio 2022 (or earlier) disable autocomplete after typing a dot (.)

How can I disable, that after typing a dot (.) Visual Studio will automatically print FileStyleUriParser? Don't get me wrong, I want the suggestions, but I don

How to convert blob / object to video React

I am building a project that has a video player that is read from FastAPI. How can I convert the blob / object into a video format. Please advise This is what I

What is the disadvantage of using a ForkJoinPool when it is not needed?

Imagine a scenario where a task can be divided into sub-tasks, each of which does some long running process. Assuming that this heavy task occurs only in 5/100

How to pass data from one component to another component in React.js?

I need help regarding the react code. I am displaying the tree view. Clicking on the tree nodes will open the component in the right. I am successfully able to

What is the right memory allocations that can be given to multiple spark streaming jobs if it is being processed in a single EMR cluster (m5.xlarge)?

I have 12 spark streaming jobs and it receives a small size data at any time. These scripts has spark transformations and joins. What is the right memory alloca

Vue-apollo subscriptions not working as expected

I am working on vue-apollo and was able to use mutations and queries, but am facing issue using subscriptions. The apollo-express server with subscriptions is w

In PSO, do you change r1,r2 for each particle during the iteration, or keep them the same during the iteration?

I have seen both versions. I was just wondering if there is a great difference between them. I always thought that r1,r2 are each a random uniform in (0,1) that

How to generate safe RSA keys deterministically using a seed?

How do we use a mnemonic list of words as a seed (like we have been become accustomed using cryptocurrency wallets) to be able to recover a private key in case

How to fix an error with connecting an IP camera using opencv in java?

I downloaded the app to the IP camera phone and I want to get the video via opencv,but it gives an error public class Main { static {System.loadLibrary(Core